{{template "../public/page_header.html"}}

<div class="container-fluid">
    <div class="row">
        <div class="panel panel-default">
            <div class="panel-heading clear">
                <a href="/{{config "String" "adminPath" ""}}/productType/add" class="btn btn-primary fr">增加商品类型</a>
            </div>
            <!--
                列表展示
            -->
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                    <tr class="th">
                        <th>商品类型名称</th>
                        <th>商品类型描述</th>
                        <th class="text-center">状态</th>
                        <th class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {{range $key,$value := .productTypeList}}
                    <tr>
                        <td>{{$value.Title}}</td>
                        <td>{{$value.Description}}</td>
                        <td class="text-center">
                        {{if eq $value.Status 1}}
                            <img src="/static/backend/images/yes.gif" class="chStatus" data-id="{{$value.Id}}"
                                 data-table="product_type" data-field="status"/>
                        {{else}}
                            <img src="/static/backend/images/no.gif" class="chStatus" data-id="{{$value.Id}}"
                                 data-table="product_type" data-field="status"/>
                        {{end}}
                        </td>
                        <td class="text-center">
                            <a href="/{{config "String" "adminPath" ""}}/productTypeAttribute?cate_id={{$value.Id}}">属性列表</a>　
                            <a href="/{{config "String" "adminPath" ""}}/productType/edit?id={{$value.Id}}"/>修改</a> 　
                            <a class="delete"
                               href="/{{config "String" "adminPath" ""}}/productType/delete?id={{$value.Id}}"/>删除</a>
                        </td>
                    </tr>
                    {{end}}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

</body>

</html>